]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Consider drop targets on !currentPage as invalid
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 24 Jun 2022 11:11:31 +0000 (13:11 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 1 Feb 2023 12:56:28 +0000 (12:56 +0000)
The iconGrid's getDropTarget() API supports dropping items to adjacent
pages just fine, but in the AppDisplay, we clip the grid and don't show
those adjacent pages. That doesn't stop getDropTarget() from picking
drop targets which are on adjacent pages though, so we need to filter
those out in the layer above.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>

js/ui/appDisplay.js

index 5008130ad4257c3076f1237334350a53ec026482..0d0b1e56aa01cc025a99edf09dd6c568986fe5ff 100644 (file)
@@ -798,6 +798,7 @@ var BaseAppView = GObject.registerClass({
 
         // Dragging over invalid parts of the grid cancels the timeout
         if (item === source ||
+            page !== this._grid.currentPage ||
             dragLocation === IconGrid.DragLocation.INVALID ||
             dragLocation === IconGrid.DragLocation.ON_ICON) {
             this._removeDelayedMove();